package cn.edu.neusoft.demo.hospital2.Service.impl;

import cn.edu.neusoft.demo.hospital2.Dao.DoctorDao;
import cn.edu.neusoft.demo.hospital2.pojo.Doctor;
import cn.edu.neusoft.demo.hospital2.Service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoctorServiceImpl implements DoctorService {

    @Autowired
    private DoctorDao doctorDao;

    @Override
    public List<Doctor> getAllDoctors() {
        return doctorDao.getAllDoctors();
    }

    @Override
    public Doctor getDoctorById(String docId) {
        return doctorDao.getDoctorById(docId);
    }

    @Override
    public int addDoctor(Doctor doctor) {
        return doctorDao.addDoctor(doctor);
    }

    @Override
    public int deleteDoctorById(String docId) {
        return doctorDao.deleteDoctorById(docId);
    }

    @Override
    public int updateDoctorById(Doctor doctor) {
        return doctorDao.updateDoctorById(doctor);
    }
}